package com.gwclh.personnel.mapper;

import com.gwclh.personnel.entity.StaTransfer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 岗位调转记录表
 * Mapper 接口
 * </p>
 *
 * @author gzhhh
 * @since 2020-07-24
 */
public interface StaTransferMapper extends BaseMapper<StaTransfer> {
    @Select("SELECT s.sta_name name,COUNT(*) value " +
            "FROM t_sta_transfer st,t_station s " +
            "WHERE s.id = st.pre_sta_id GROUP BY st.pre_sta_id")
    List<Map<String, Object>> selectStationTransferData();
}
